package com.zhora.entity.ai;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.*;
import com.zhora.db.common.config.JsonTypeHandler;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.util.Map;

/**
 * ai文档(ai_library_doc)实体类
 *
 * @author zhehen.lu
 * @since 2025-09-15 17:43:14
 */
@Data
@TableName(value = "ai_library_doc")
public class AiLibraryDocEntity implements Serializable {
    private static final long serialVersionUID = 390193378976966560L;
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 知识库ID
     */
    @TableField(value = "lib_id")
    private Long libId;

    /**
     * 文档名称
     */
    @TableField(value = "name")
    private String name;

    /**
     * 识别ID
     */
    @TableField(value = "identify")
    private String identify;

    /**
     * 文档路径
     */
    @TableField(value = "path")
    private String path;

    /**
     * 文档原生json
     */
    @TableField(value = "meta", typeHandler = JsonTypeHandler.class)
    @Schema(description = "文档原生json")
    private Map<String, Object> meta;

    /**
     * 是否启用
     */
    @TableField(value = "enable")
    private Boolean enable;

    /**
     * 状态[SUCCESS:成功  INDEXING:初始化]
     */
    @TableField(value = "status")
    private String status;

    /**
     * 删除标记,true:已删除,false:正常
     */
    @TableLogic
    @TableField(value = "del_flag")
    private Boolean delFlag;

    /**
     * 创建人
     */
    @TableField(value = "create_by")
    private String createBy;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 更新人
     */
    @TableField(value = "update_by")
    private String updateBy;

    /**
     * 更新时间
     */
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

}

